export const actionTypes = [
  {value: 'add', title: '新增'},
  {value: 'edit', title: '修改'},
  {value: 'detail', title: '只读'},
];

export const auths = [
  {value: 'edit', title: '编辑'},
  {value: 'browse', title: '浏览'},
  {value: 'hide', title: '隐藏'},
];

export const AuthType = {
  edit: 'edit',
  browse: 'browse',
  hide: 'hide'
};

export function getDictTitle(value, list) {
  let res = (list || []).find(item => item.value === value);
  return res && res.title || undefined;
}